﻿
@{
    ViewData["Title"] = "UnitFindShow";
    Layout = "~/Views/Shared/Template.cshtml";
}

<h1>UnitFindShow</h1>

<div class="layui-form-item">
    <div class="layui-inline">
        <div class="layui-inline">
            <label class="layui-form-label">单位编号:</label>
            <div class="layui-input-block">
                <input type="text" id="unitNo" name="unitNos" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">单位名称:</label>
            <div class="layui-input-block">
                <input type="text" id="unitName" name="unitNames" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">备注:</label>
            <div class="layui-input-block">
                <input type="text" id="unitRemarks" name="unitRemarkss" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <input type="hidden" id="h2" name="Did" />
    <button type="button" onclick="Show()" class="layui-btn layui-success">🔍搜索</button>
</div>

<script>
    $(function () {
        Find()
    })
    function Find() {
        var unitId = localStorage["unitId"];
        $.ajax({
            url: "http://10.223.8.22:8000/purchase/api/Unit/FindUnit",
            type: "post",
            contentType: "application/json",
            data: { unitId: unitId },
            success: res => {
                $("#h2").val(unitId);
                $("#unitNo").val(unitNos);
                $("#unitName").val(unitNames);
                $("#unitRemarks").val(unitRemarkss);
            }
        })
    }
</script>